package com.yoso.controller;

import org.apache.commons.io.FileUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;

/**
 * @author shizejin
 * @date 2021/12/9
 * @description:
 */
@RestController
public class FileController {
    @GetMapping("upload")
    public void upload(HttpServletResponse response){
        String path = "C:\\Users\\12425\\Desktop\\20092601";
        try {
            FileUtils.copyDirectory(new File(path),new File(path+"test"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
